package com.tlxch.controller.teacher;

import com.tlxch.dto.TStudentTAlertdto;
import com.tlxch.pojo.SStudent;
import com.tlxch.pojo.TAlertreport;
import com.tlxch.result.Result;
import com.tlxch.server.teacher.TAlertreportService;
import com.tlxch.vo.TAlertreportvo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Api(tags = "预警报告相关接口")
@Slf4j
@RestController
@RequestMapping("/teacher/talertreport")
public class TAlertreportController {
    @Autowired
    TAlertreportService tAlertreportService;

    @GetMapping("/getAlertReport")
    @ApiOperation("获取预警报告相关信息")
    public Result<TAlertreportvo> getAlertReport(TStudentTAlertdto student) {
        TAlertreportvo tAlertreportvo = tAlertreportService.getAlertReport(student);
        return Result.success(tAlertreportvo);
    }

    @PostMapping("/addAlertReport")
    @ApiOperation("添加预警报告")
    public Result addAlertReport(@RequestBody TAlertreport student) {
        tAlertreportService.addAlertReport(student);
        return Result.success();
    }

}
